efficiency optimization
Energy Considerations of Large Language Model Inference and Efficiency Optimizations
Fernandez, Jared, Na, Clara, Tiwari, Vashisth, Bisk, Yonatan, Luccioni, Sasha, Strubell, Emma
As large language models (LLMs) scale in size and adoption, their computational and environmental costs continue to rise. Prior benchmarking efforts have primarily focused on latency reduction in idealized settings, often overlooking the diverse real-world inference workloads that shape energy use. In this work, we systematically analyze the energy implications of common inference efficiency optimizations across diverse Natural Language Processing (NLP) and generative Artificial Intelligence (AI) workloads, including conversational AI and code generation. We introduce a modeling approach that approximates real-world LLM workflows through a binning strategy for input-output token distributions and batch size variations. Our empirical analysis spans software frameworks, decoding strategies, GPU architectures, online and offline serving settings, and model parallelism configurations. We show that the effectiveness of inference optimizations is highly sensitive to workload geometry, software stack, and hardware accelerators, demonstrating that naive energy estimates based on FLOPs or theoretical GPU utilization significantly underestimate real-world energy consumption. Our findings reveal that the proper application of relevant inference efficiency optimizations can reduce total energy use by up to 73% from unoptimized baselines. These insights provide a foundation for sustainable LLM deployment and inform energy-efficient design strategies for future AI infrastructure.
LLM4EFFI: Leveraging Large Language Models to Enhance Code Efficiency and Correctness
Ye, Tong, Huang, Weigang, Zhang, Xuhong, Ma, Tengfei, Liu, Peiyu, Yin, Jianwei, Wang, Wenhai
Large Language Models (LLMs), particularly Code LLMs, have demonstrated impressive performance in code generation. Current research primarily focuses on the correctness of generated code, while efficiency remains less explored. Recent works have focused on modifying the initial version of the code to improve its efficiency. However, such refinements are limited by the algorithmic design and overall logic of the initial code, resulting in only incremental improvements. In contrast, when human developers write high-quality code, they typically begin by designing several potential solutions at the logical level, evaluating various algorithms and their complexities, and then proceeding to implement and optimize the solution. In this study, we introduce \tool: \uline{L}arge \uline{L}anguage \uline{M}odel for Code \uline{Effi}ciency, a novel framework that enables LLMs to generate code that balances both efficiency and correctness. Specifically, \tool divides the efficiency optimization process into two domains: algorithmic exploration in the logic domain and implementation optimization in the code domain. The correctness of the code is then guaranteed through a synthetic test case refinement process. This approach, which prioritizes efficiency before ensuring correctness, offers a new paradigm for efficient code generation. Experiments demonstrate that \tool consistently improves both efficiency and correctness, achieving new state-of-the-art performance in code efficiency benchmarks across various LLM backbones.
Efficiency Optimization of a Two-link Planar Robotic Arm
Fathizadeh, Meysam, Richter, Hanz
Energy consumption optimization of a two-link planar robotic arm is considered with the system's efficiency being the target for optimization. A new formulation of thermodynamic principles within the framework of dynamical systems is used. This approach is applied by considering cyclic motions for the robotic arm and analyzing the cyclic averaged energies while the robotic arm is tasked with going from point A to point B in the task space while resisting an external force. The energy transfer rate between the links is classified into positive and negative and the results combined with the averaged energy quantities, are used to address the optimization problem while adhering to the constraints imposed by the second law of thermodynamics in its new formulation.